package com.teemo.dp.singleton.demo2;

/**
 * @author Teemo
 */
public class Washer {
    private Washer() {
        System.out.println("Washer is created");
    }

    private static Washer washer;

    static {
        washer = new Washer();
    }

    public static Washer getInstance() {
        return washer;
    }

    public void wash() {
        System.out.println("washing...");
    }

}
